A memory cache, also known as a cache store or RAM cache, is a portion of memory comprised of high-speed static RAM (SRAM) instead of the slower dynamic RAM (DRAM) that is used for main memory. Computer systems use memory caching because many programs tend to repeatedly access the same data or instructions. By storing this frequently accessed information in SRAM, the computer system exhibits enhanced performance characteristics because the computer system avoids the necessity of repeatedly accessing the slower DRAM. Some memory caches are built into the architecture of microprocessors themselves. For example, conventional microprocessors may contain an internal 8K or 16K memory cache. Such internal caches are often called Level 1 (L1) caches. Many computer systems also come with external cache memory, called a Level 2 (L2) caches. Level 2 caches are often located between the CPU and the DRAM. Like L1 caches, L2 caches are composed of SRAM. L2 caches are typically much larger than L1 caches.
Disk caching works under the same principle as memory caching. The most recently accessed data from the disk (as well as adjacent sectors) is stored in a RAM memory buffer. When a program needs to access data from the disk, it first checks the disk cache to see if the data is there. Disk caching can dramatically improve the performance of applications, as accessing data in RAM can be many times faster than accessing data on a hard disk.
Write-back caching, or copy-back caching, is a caching method in which modifications to data in the cache are not copied to the cache source, such as the original data or the main memory, until absolutely necessary. For microprocessor that support write-back caching, data modifications or write operations to data stored in the L1 cache are not immediately copied to main memory or original data. Instead, the modified data is marked, and the main memory or original data is changed when the cached data is deallocated. In contrast, a write-through cache performs all write operations in parallel--data is written to main memory and the L1 cache simultaneously. Write-back caching yields better performance than write-through caching because it reduces the number of write operations to main memory. However, despite the performance advantage of write-back caching, write-back caching carries with it the risk of data loss in event of a system crash or sudden loss of power. Generally, when the system crashes or experiences a power loss, the operating system has a recovery method that assumes that key data was written to the disk. But if the computer system suffers a sudden loss of power before the system can copy the cache to the disk, then the operating system recovery method will not be effective in restoring the lost cached data. Thus, any information that is not actually on the disk or protected by a battery backup will be lost.
Some computer systems employ a battery backup circuit as an auxiliary source of power for use in situations when the main power has been shut off or lost. A battery may also be used to provide power to the computers internal clock/calendar and to the circuitry responsible for that part of RAM that stores important system information. A battery may also be incorporated in an uninterruptible power supply (UPS) device. A UPS device is a device that contains both a battery and a loss-of-power sensor and is electrically coupled to both the computer system and the power supply. When the UPS unit detects a loss of power, it switches over to the battery so that the user is provided with a temporary source of power.
Batteries, such as NiCad batteries, may be prone to the memory effect. Memory effect refers to the tendency for a battery to lose its capacity for full recharging if it is repeatedly discharged at the same amount and then recharged without overcharge before being fully drained. The battery then exhibits a diminished capacity, or memory, for the amount of charging it can subsequently sustain. In order to avoid this memory effect and to maximize battery performance and life, batteries are periodically reconditioned. Reconditioning, or deep cycling, a battery involves completely draining a battery to its lowest state and then fully recharging it. Reconditioning helps offset the chemical reactions that cause the memory effect. In some cases, if the battery is not properly charged, even reconditioning will not enable the battery to charge to its full capacity. Due to improvements in their chemical makeup, modern battery models based on NiMHi (Nickel Metal Hydride) chemistry do not exhibit the same memory effect of older NiCad battery models. While modem batteries are less susceptible to this memory effect, it is still advisable to recondition batteries every six months because, even though the battery is generally not used, its capacity will drift away from its full capacity. Reconditioning will bring the battery back to its full capacity.
Many products provide utilities that allow the user to specify reconditioning periods. For example, a utility may allow for the setup of an interval period of six months and prompt the user when this interval elapses. Typically, the user must then enter the utility and either postpone or initiate the reconditioning process. One drawback of reconditioning is that the reconditioning process has an adverse impact on the data integrity of the computer system. In the conventional reconditioning process, the battery in the battery circuit used as a backup power source is electrically decoupled from the load while it is being deep-cycled. Because the battery cannot supply power to the load during the reconditioning process, the load must be supplied from sources that are dependent upon AC power. If AC power is lost during the reconditioning process, then the load cannot be supplied. As a result, the computer system will lose any data that is stored in volatile memory, such as a memory cache.
In mission-critical or continuous computer systems, such as servers that are intended to operate continuously, this risk is not acceptable. Therefore, it is a general practice in mission-critical applications for the computer system to employ write-through caching rather than write-back caching. As discussed above, write-through caching writes in parallel and thereby minimizes the risk that data changes will be lost in the event that AC power is lost while the battery is unavailable. Unfortunately, systems employing write-through caching incur a performance loss in comparison with those utilizing write-back caching.
The battery reconditioning process typically takes several hours. The length of time may vary depending on the charge rate of the battery charger. Because the process of charging a battery generates a substantial amount of heat, the charge time is typically determined based on the rise in battery temperature for a fixed charge rate and the worst case ambient temperature tolerated by the computer system. It is undesirable to charge the battery too quickly because the additional heat that is generated by this process may damage those computer components that are already close to their maximum operating temperature. As a result, the battery reconditioning process may take up to eight hours. This is an undesirably long period of time to operate a server in the slower write-through mode.